package de.fuberlin.inf.alp3.ue02;

public interface Reservable {
    /**
     * Tries to reserve the seats from "seatFrom" to "seatTo" in Row "row".
     * Either all requested seats are reserved or no seat at all.
     * @param   the row.
     * @param   the first seat that has to be reserved.
     * @param   the last seat that has to be reserved.
     * @return  true, if the requested seats have been reserved or false, if the
     *          Reservable has not been modified.
     */
    public boolean reserve(char row, int seatFrom, int seatTo);
    /**
     * Tries to cancel the seats from "seatFrom" to "seatTo" in Row "row". This
     * will only succeed if the seats had actually been reserved.
     * @param   the row.
     * @param   the first seat that has to be canceled.
     * @param   the last seat that has to be canceled.
     * @return  true, if the requested seats have been canceled or false, if
     *          the Reservable has not been modified.
     */
    boolean cancel(char row, int seatFrom, int seatTo);
    /**
     * @return  the maximum row as lowercase char, rows are named from 'a' to
     *          this character.
     */
    public char getMaxRow();
    /**
     * @return  the maximum seat number. Seats are numbered from 1 to this
     *          number.
     */
    public int getMaxSeat();
}